﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CDB.LinqModel.Data;
using CDB.LinqData;
using CDB.LinqModel;

public partial class popUpArchitects : System.Web.UI.Page
{
    #region Variable Declaration
    IDataRepository _dataObject = new DataRepository();
    Architect architect;
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["Id"] != null)
            {
                bindArchitect(Request.QueryString["Id"].ToString());
            }
        }
    }
    private void bindArchitect(string Id)
    {
        architect = new Architect(_dataObject);
        architect.Id = Convert.ToInt32(Id);

        architect.GetArchitectById();

        if (architect.Id != 0)
        {
            //spBuilderName.InnerText = architect.FirstName + " " + architect.LastName;
            //tdName.InnerText = architect.FirstName + " " + architect.LastName;
            //tdSponsorTitle.InnerHtml = architect.SponsorTitle;
            //tdBibliography.InnerHtml = architect.Biography;
            //img.Src = "architects/" + architect.Image;
        }
    }
}